import fetch from 'common/src/utils/fetch';

/**
 * 查询培养方案关联列表
 */
export function queryRelevanceList(data) {
    return fetch({
        url:
            '/api/cultureservice/minorStudentCultureRel/findMinorStudentCultureRelList',
        method: 'POST',
        data
    });
}

/**
 * 关联培养方案
 */
export function relevanceScheme(data) {
    return fetch({
        url:
            '/api/cultureservice/minorStudentCultureRel/addMinorStudentCultureRelByManual',
        method: 'PUT',
        data
    });
}

/**
 * 取消关联培养方案
 */
export function cancelRelevanceScheme(data) {
    return fetch({
        url:
            '/api/cultureservice/minorStudentCultureRel/cancelMinorStudentCultureRelByManual',
        method: 'PUT',
        data
    });
}

/**
 * 自动关联培养方案
 */
export function autoRelevanceScheme(data) {
    return fetch({
        url:
            '/api/cultureservice/minorStudentCultureRel/addMinorStudentCultureRelByManual',
        method: 'PUT',
        data
    });
}

/**
 * 批量关联培养方案
 */
export function batchRelevanceScheme(data) {
    return fetch({
        url:
            '/api/cultureservice/minorStudentCultureRel/batchAddMinorStudentCultureRelByManual',
        method: 'PUT',
        data
    });
}

/**
 * 批量取消关联培养方案
 */
export function batchCancelRelevanceScheme(data) {
    return fetch({
        url:
            '/api/cultureservice/minorStudentCultureRel/batchCancelMinorStudentCultureRelByManual',
        method: 'PUT',
        data
    });
}

/**
 * 查询本次需要自动绑定的学生个数
 */
export function countNeedBindSchemeStudent(data) {
    return fetch({
        url:
            '/api/cultureservice/minorStudentCultureRel/countNeedBindMinorSchemeStudent',
        method: 'post',
        data
    });
}

/**
 * 自动关联培养方案
 */
export function bindSchemeStudent(data) {
    return fetch({
        url:
            '/api/cultureservice/minorStudentCultureRel/autoMinorStudentCultureRelByManual',
        method: 'put',
        data
    });
}
